Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace std::thread::sleep with tokio::time::sleep in async functions #39

Conversation

dimtgsn
Copy link
Contributor

@dimtgsn dimtgsn commented Mar 5, 2024

Hi!

When using legba in a container (docker/podman) along with the flag --cpus=".5" (or even 1):
docker run --cpus=".5" -it evilsocket/legba ssh -T 10.0.4.10 -U admin -P admin
The program hangs, regardless of the plugin.

It seems to me that the thread is hanging due to the use of std::thread::sleep in asynchronous functions (https://doc.rust-lang.org/std/thread/fn.sleep.html).

I think this can be fixed by using tokio::time::sleep in asynchronous functions.

@evilsocket evilsocket merged commit 071002b into evilsocket:main Mar 12, 2024
1 check passed
@evilsocket
Copy link
Owner

thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants